<template>
  <div id="app">
    <!-- <Hello :data="msg"></Hello> -->
    <!-- <div>app</div> -->

    <!-- <movie-item></movie-item> -->
    <MovieItem :item="item" 
    v-for="item of movies" 
    :key="item.title"></MovieItem>
  </div>
</template>

<script>
// import Hello from './components/Hello'
import MovieItem from './components/MovieItem.vue';
import axios from 'axios';

export default {
  name: 'App',
  
  components: {
    // Hello,
    MovieItem
  },
  data(){
    return{
      // msg:"good",
      movies:[]

    }
  },
  mounted(){
    axios.get("http://localhost:8000/top250").then(res=>{
      // console.log(res.data.result)
      this.movies = res.data.result
    })
  }
}
</script>

<style>

</style>
